package com.wjq.boot.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wjq.boot.core.Base;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author wangjiaquan
 * @since 2024-08-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("sys_resource")
@ApiModel(value = "SysResource对象", description = "权限表")
public class SysResource extends Base {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("权限名称")
    private String name;

    @ApiModelProperty("权限描述")
    private String description;

    @ApiModelProperty("上级id")
    private Long parentId;

    @ApiModelProperty("前端地址")
    private String frontUrl;

    @ApiModelProperty("后端地址")
    private String backUrl;

    @ApiModelProperty("权限等级")
    private Integer level;

    @ApiModelProperty("权限类型 1-目录 0-按钮")
    private Integer type;

    @TableField(exist = false) // 表明这个字段不是数据库表中的字段
    @ApiModelProperty("保存下一级权限")
    private List<SysResource> childResources;

}
